<div class="modal-header">
    <h3 class="modal-title">{{serverGroup.name}}服务器列表</h3>
</div>
<div class="modal-body">
    <form class="form-inline" role="form">
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">名称</span>
                <input type="text" class="form-control" ng-model="queryName" placeholder="名称">
            </div>
        </div>
        <div class="form-group">
            <div class="input-group">
                <span class="input-group-addon">环境类型</span>
                <select class="form-control" ng-model="nowEnv" ng-options="envItem.code as envItem.name for envItem in envType">
                    <option value="">--请选择--</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <button type="button" class="btn btn-info" ng-click="doQuery()">搜索</button>
            <button type="button" class="btn btn-info" ng-click="reSet()">重置</button>
        </div>
    </form>
    <div style="margin-top: 5px;">
        <table class="table table-hover table-bordered table-striped">
            <thead>
            <tr>
                <td>服务器</td>
                <td>公网IP</td>
                <td>内网IP</td>
                <td>使用类型</td>
                <td>环境</td>
                <td>序列号</td>
                <td ng-if="contains(authPoint, '/server/del')">操作</td>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="item in pageData">
                <td>{{item.serverName}}</td>
                <td>{{item.publicIP.ip}}</td>
                <td>{{item.insideIP.ip}}</td>
                <td>
                    <b style="color:{{item.serverGroupUseTypeDO.color}}">{{item.serverGroupUseTypeDO.typeName}}</b>
                </td>
                <td>
                    <b style="color: {{item.env.color}}">{{item.env.name}}</b>
                </td>
                <td>{{item.serialNumber}}</td>
                <td ng-if="contains(authPoint, '/server/del')">
                    <button type="button" class="btn btn-sm btn-danger pull-right" ng-click="delServer(item.id)">删除</button>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="7">
                    <ul style="margin: 0px; float: right;" uib-pagination total-items="totalItems" ng-model="currentPage" items-per-page="pageLength" max-size="10" ng-change="pageChanged(currentPage)" previous-text="&lsaquo;" next-text="&rsaquo;"></ul>
                </td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>